In the field of video and image processing, it is sometimes desirable to alter or modify the colors of the images. Some color modifications may be in the form of mapping one color to another, or adjusting the brightness based on color. Some of the applications of color mapping include, for example, flesh-tone adjustment wherein colors “near” flesh may be mapped to correct flesh hue. Green-stretch is another application by which the saturation of green (or any other color) may be increased. Green-boost is another application by which the value of green (or any other color) may be increased. Green-bright is an application by which the brightness of green (or any other color) may be increased. Saturation is an application by which the saturation of all colors may be increased. The hue application allows the hue of a color to be adjusted.
A video or image pixel may typically be represented as a 24-bit value. There are several variations of pixel representations such as, for example, 24-bit RGB, 24-bit YCrCb, and 24-bit YUV. Other variations may utilize more or less than 24 bits. In some systems a color-mapping table may be used to map the colors in an original image to the desired corresponding colors in a new image. In some color-mapping applications, a full color-mapping table may require 48 megabytes of storage, which may be impractical in systems with low-cost implementations. Typically, personal computers use color palettes, which are implemented as look up tables with entries constituting the mapping for colors. The problem with such systems is that they take an input and find the nearest possible color to map to in the look up table, so each input color does not have a unique color to be mapped to, and hence full color mapping cannot be done. Furthermore, using such color palettes can cause distortions to the images.
Some simple systems use RGB color schemes, where each pixel is represented by a red (R), green (G), and blue (B) component. A one-dimensional table represents each of the components, with fixed values being used for mapping the red, green, or blue component to a different intensity. The problem with such systems is that if, for example, a pixel is purple and it needs to be mapped to a different color, then the red and blue components need to be mapped to different red and blue components to get a new purple. However, the problem with doing so is that it will also affect the red and blue pixels, and other pixels with colors that have the same red and blue components as the purple pixel.
Additionally, existing color-mapping methods do not provide the ability to change the brightness of the color in addition to the color mapping. The two functions usually have to be performed separately.
Further limitations and disadvantages of conventional and traditional approaches will become apparent to one of skill in the art, through comparison of such systems with some aspects of the present invention as set forth in the remainder of the present application with reference to the drawings.